<?php
namespace Admin\Controller;
use Admin\Controller\AdminBaseController;
use Common\Model\CurrencyModel;
class CurrencyController extends AdminBaseController{
	public function showlist()
	{
	    $info=CurrencyModel::newSelf()->getInfo();
	    $this->assign('info',$info);
	    $this->display();
	}
	public function update()
	{
	    $input=I('post.');

	    $info=CurrencyModel::newSelf()->getInfo();
        $model=CurrencyModel::newSelf();
        $currency=$model->getInfo();
        foreach ($currency as $k=>$v)
        {
            $model->where($v)->setField('reward_ratio',I('id'.$k));
        }
        $this->returnResult('修改成功',true);
	}
}
